package com.corona.game;

import com.corona.Game;

import java.util.Locale;

/* compiled from: Battle.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/PrintAngryEating.class */
public class PrintAngryEating extends Action {
    public Action.Layer layer = Action.Layer.gui_120;

    public PrintAngryEating(Game game, Action nextAction) {
        super(new Object[0]);
        this.nextAction = nextAction;
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        if (game.battle.oppPokemon.angry > 0) {
            game.insertAction(new DisplayText(game, "Wild " + game.battle.oppPokemon.nickname.toUpperCase(Locale.ROOT) + " is angry!", (String) null, (Action) null, this.nextAction));
            game.actionStack.remove(this);
            game.battle.oppPokemon.angry--;
            if (game.battle.oppPokemon.angry <= 0) {
                game.battle.oppPokemon.currentStats.put("catchRate", Integer.valueOf(game.battle.oppPokemon.baseStats.get("catchRate").intValue()));
            }
        } else if (game.battle.oppPokemon.eating > 0) {
            game.insertAction(new DisplayText(game, "Wild " + game.battle.oppPokemon.nickname.toUpperCase(Locale.ROOT) + " is eating!", (String) null, (Action) null, this.nextAction));
            game.actionStack.remove(this);
            game.battle.oppPokemon.eating--;
        } else {
            game.insertAction(this.nextAction);
            game.actionStack.remove(this);
        }
    }
}
